import request from '@/utils/request';

export function getCategories() {
  return request({
    url: '/api/categories/index',
    method: 'get'
  });
}

export function addCategory(data: { name: string; description: string }) {
  return request({
    url: '/api/categories',
    method: 'post',
    data
  });
}

export function deleteCategory(id: number) {
  return request({
    url: `/api/categories/${id}`,
    method: 'delete'
  });
} 